<%@ page import="com.wuchao.service.serviceImpl.ServiceImpl" %>
<%@ page import="com.wuchao.entity.User" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Root404
  Date: 2022/6/25
  Time: 15:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        h1{
            color:red;
            font-size: 33px;
        }
    </style>
</head>
<body>
<h1>欢迎来到jsp的世界151143</h1>
<table border="4">
    <tr>
        <th>id</th>
        <th>name</th>
        <th>sex</th>
        <th>操作</th>
    </tr>
<%
   /* int a=3;
    out.println(a+"<br/>&nbsp;");//mysql+服务器+文档*/
    ServiceImpl spl = new ServiceImpl();
    List<User> list = spl.findPoJo("select * from user");
    for(User xjj : list){%>
    <tr>
        <td><%=xjj.getId()%> </td>
        <td><%=xjj.getName()%></td>
        <td><%=xjj.getSex()%></td>
        <td><a href="controller.jsp?id=<%=xjj.getId()%>">删除</a> 修改</td>
    </tr>
<%}
%>
    <%=request.getParameter("f1")==null?"":"删除成功"%>
    <%=request.getParameter("f2")==null?"":"删除失败"%>
</table>
<script src="../js/jquery.js"></script>
<script>
$("tr").css("background-color","yellow");
$("tr:odd").css("background-color","green");
</script>
</body>
</html>
